import $http from "../assets/js/http";

// 床位查询
export async function searchBerth({
  jobNumber,
  name,
  department,
  roomNumber,
  page
}) {
  return $http.post("building/Building/searchBerth", {
    jobNumber,
    name,
    department,
    roomNumber,
    page
  })
}

// 床位修改
export async function alterBerth({
  serial,
  tel,
  remark,
  berthType
}) {
  return $http.post("building/Building/alterBerth", {
    serial,
    tel,
    remark,
    berthType
  })
}

// 获取房间床位
export async function getBerth({
  affiliationNumber,
  dormNumber,
  roomNumber
}) {
  return $http.post("building/Building/getBerth", {
    affiliationNumber,
    dormNumber,
    roomNumber
  })
}

// 床位调整
export async function replaceBerth(serial, replaceSerial) {
  return $http.post("building/Building/replaceBerth", {
    serial,
    replaceSerial
  })
}

// 获得床位以及柜子
export async function getBerthAndCupboard(area, dorm, layers, roomNumber) {
  return $http.post("building/Building/getBerthAndCupboard", {
    area,
    dorm,
    layers,
    roomNumber
  })
}

// 核对员工信息
export async function updatePersonInfo() {
  return $http.post("building/Building/updatePersonInfo")
}
